package com.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class SetmealFood implements Serializable {
    /**
     * 套餐食物关联编号
     */
    private Integer sfid;

    /**
     * 套餐编号
     */
    private String smid;

    /**
     * 食物编号
     */
    private String fid;

    /**
     * 食物数量
     */
    private Integer sfnum;

    private Food Food;



    private static final long serialVersionUID = 1L;

    public Integer getSfid() {
        return sfid;
    }

    public void setSfid(Integer sfid) {
        this.sfid = sfid;
    }

    public String getSmid() {
        return smid;
    }

    public void setSmid(String smid) {
        this.smid = smid;
    }

    public String getFid() {
        return fid;
    }

    public void setFid(String fid) {
        this.fid = fid;
    }

    public Integer getSfnum() {
        return sfnum;
    }

    public void setSfnum(Integer sfnum) {
        this.sfnum = sfnum;
    }


    public com.entity.Food getFood() {
        return Food;
    }

    public void setFood(com.entity.Food food) {
        Food = food;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SetmealFood other = (SetmealFood) that;
        return (this.getSfid() == null ? other.getSfid() == null : this.getSfid().equals(other.getSfid()))
            && (this.getSmid() == null ? other.getSmid() == null : this.getSmid().equals(other.getSmid()))
            && (this.getFid() == null ? other.getFid() == null : this.getFid().equals(other.getFid()))
            && (this.getSfnum() == null ? other.getSfnum() == null : this.getSfnum().equals(other.getSfnum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSfid() == null) ? 0 : getSfid().hashCode());
        result = prime * result + ((getSmid() == null) ? 0 : getSmid().hashCode());
        result = prime * result + ((getFid() == null) ? 0 : getFid().hashCode());
        result = prime * result + ((getSfnum() == null) ? 0 : getSfnum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", sfid=").append(sfid);
        sb.append(", smid=").append(smid);
        sb.append(", fid=").append(fid);
        sb.append(", sfnum=").append(sfnum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}